﻿@model Yqblog.Models.LogOnModel
@using lang = Resource.Web;
@{
    ViewBag.Title = lang.Login;
}
<h2>@lang.Login</h2>
<div class="alert alert-warning">
    <button data-dismiss="alert" class="close" type="button">×</button>
    @lang.LogOn_Tip @Html.ActionLink(lang.Register, "Register")。
</div>
@using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new {id = "loginForm", @class = "form-horizontal", role = "form"}))
{
    <div>
        <h4>@lang.LogOn_AccountInfo</h4>
        <input id="returnUrl" name="returnUrl" value="@ViewBag.ReturnUrl" type="hidden" />
        <div class="form-group">
            <label for="UserName" class="col-sm-2 control-label"><span>@lang.Username</span></label>
            <div class="col-sm-10 input-wrap">
                <div class="col-sm-3"><input type="text" value="" class="form-control" name="UserName" id="UserName"/></div>
                <span class="form_tip"></span>
            </div>
        </div>
        <div class="form-group">
            <label for="Password" class="col-sm-2 control-label"><span>@lang.Password</span></label>
            <div class="col-sm-10 input-wrap">
                <div class="col-sm-3"><input type="password" class="form-control" name="Password" id="Password"/></div>
                <span class="form_tip"></span>
            </div>
        </div>
        
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="summary_tip_wrap"><p class="summary_tip"></p></div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10 loadingwrap">
                <div class="checkbox" style="margin-bottom: 10px;">
                    <label>
                        <input type="checkbox" value="true" name="RememberMe" id="RememberMe"/> @lang.LogOn_RememberMe
                    </label>
                </div>
                <a class="btn btn-default" id="BtnLogon">@lang.Login</a>
            </div>
        </div>

    </div>
}
@section Js{
    <script type="text/javascript">
        $(function() {
            $(document).keypress(function(event) {
                if (event.keyCode == 13) {
                    $("#BtnLogon").trigger('click');
                }
            });
        });
    </script>
}

